//#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <queue>
using namespace std;

int main()
{
	int n, m;
	char mg[105][105] = { 0 };
	bool vis[105][105] = { 0 };
	cin >> n >> m;
	for (int i = 1;i <= n;i++) {
		for (int j = 1;j <= m;j++) {
			cin >> mg[i][j];
		}
	}
	queue<pair<int, int>>q;
	int cnt = 0;
	int dx[] = { 1,0,-1,0 };
	int dy[] = { 0,1,0,-1 };
	q.push({ 1,1 });
	vis[1][1] = true;
	while (!q.empty()) {
		int x = q.front().first;
		int y = q.front().second;
		cout << x << y << endl;
		q.pop();
		for (int i = 0;i < 4;i++) {
			int tx = x + dx[i];
			int ty = y + dy[i];
			if (vis[tx][ty] == true)
				continue;
			if (tx<1 || ty<1 || tx>n || ty>m)
				continue;
			if (mg[tx][ty] == '#')
				continue;
			q.push({ tx,ty });
			vis[tx][ty] = true;
			if (tx == n && ty == m)
			{
				cout << "Yes" << endl;
				goto end;
			}
		}
	}
	cout << "No" << endl;
end:;
	return 0;
}